/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 19182
 * Date: 2025-09-02
 * Time: 19:46
 */
public class demo2 {
    public static void main(String[] args) {
        Thread c = new Thread(()->{
            System.out.print("c");
        });
        Thread b = new Thread(()->{
            try {
                c.join();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.print("b");
        });
        Thread a = new Thread(()->{
            try {
                b.join();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println("a");

        });
        c.start();
        b.start();
        a.start();
    }
}
